package com.kaibes.module.permission.db.entity;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

import com.kaibes.core.base.annotation.Description;

import lombok.Data;

/**
CREATE TABLE `role` (
  `id` smallint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `remark` tinytext,
  `sort` smallint unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
 */
@Data
@Description("角色信息")
public class Role {
    @Description("角色ID")
    private Integer id;
    @Description("角色名称")
    @NotBlank(message = "角色名称不能为空")
    private String name;
    @Min(value = 0, message = "排序必须不小于0")
    @Description("角色排序")
    private Integer sort;
    @Description("角色备注")
    private String remark;
}
